package org.tangerinejunction.imstats.util;

import java.awt.Color;
import java.util.Arrays;

/**
 * A collection of constants.
 * 
 * @author meganthorsen
 */
public class Constants 
{
	/*
	 * The time increments predefined for the purpose of bucketing 
	 * data
	 */
	public static final Increment[] increments =
	{
		Increment.DAY,
		Increment.WEEK,
		Increment.MONTH,
		Increment.YEAR//,
		//new Increment("6 days", 6, 0, 0),
		//new Increment("5 days", 5, 0, 0),
		//new Increment("4 days", 4, 0, 0),
		//new Increment("3 days", 3, 0, 0),
		//new Increment("2 days", 2, 0, 0),
		//new Increment("3 months", 0, 3, 0)
	};
	
	/*
	 * The predefined time cycles used in the Cycle charts
	 */
	public static final Cycle[] cycles =
	{
		Cycle.DAY_OF_WEEK,
		Cycle.MONTH_OF_YEAR
	};
	
	public static final String SORT_VALUE = "by value";
	public static final String SORT_CONSISTENCY = "by consistency";

	/*
	 * Types of sorting allowed in the Trend charts
	 */
	public static final String[] sorts =
	{
		SORT_VALUE,
		SORT_CONSISTENCY
	};
	
	public static final String PRESET_LAST_8_WEEKS = "Last 8 weeks";
	public static final String PRESET_LAST_YEAR = "Last year by month";
	public static final String PRESET_FOREVER_BY_MONTH = "Forever by month";
	public static final String PRESET_FOREVER_BY_YEAR = "Forever by year";
	
	/*
	 * Names of preset time ranges
	 */
	public static final String[] presets =
	{
		PRESET_LAST_8_WEEKS,
		PRESET_LAST_YEAR,
		PRESET_FOREVER_BY_MONTH,
		PRESET_FOREVER_BY_YEAR
	};
	
	/*
	 * Background color for charts
	 */
	public static final Color chartBackground = new Color(230, 230, 230);
	
	/*
	 * Palette from Ove Lampe
	 */
	public static final Color[] colorPalette = 
	{ 
		new Color(166, 206, 227),
    	new Color(31, 120, 180),
    	new Color(178, 223, 138),
    	new Color(51, 160, 44),
    	new Color(251, 154, 153),
    	new Color(227, 26, 28),
    	new Color(253, 191, 111),
    	new Color(255, 127, 0),
    	new Color(202, 178, 214),
    	new Color(106, 61, 154),
    	new Color(255, 255, 153),
    	new Color(177, 89, 40)
	};

	/*
	 * Palette from Ove Lampe
	 */
	public static final Color[] pastelPalette = 
	{ 
		new Color(141, 211, 199),
    	new Color(255, 255, 179),
    	new Color(190, 186, 218),
    	new Color(251, 128, 114),
    	new Color(128, 177, 211),
    	new Color(253, 180, 98),
    	new Color(179, 222, 105),
    	new Color(252, 205, 229),
    	new Color(217, 217, 217),
    	new Color(188, 128, 189),
    	new Color(204, 235, 197),
    	new Color(255, 237, 111)
	};
	
	/*
	 * A list of stop words (common, uninteresting words) for use
	 * in filters
	 */
	public static final String[] stopWords =
	{
		// the following are from an online stop words list
		"a","an","the",
	       "am","is","are","was","were","be","being","been",
	       "have","has","had","do","does","did","may","might","must",
	       "can","could","shall","should","will","would",
	       "done","doing","having","ought",
	       "and","but","or","nor","for","yet","so",
	       "of","in","to","with","on","by","at","from","as",
	       "i","me","my","you","your","it","its","he","him","his","she","her","we","us","our","they","them","their",
	       "that","this","these","those","there",
	       "no","not","yes",
	       "which","what","who","whose","how","how's",
	       "if","all","more","other","another","one",
	       "i'm","i've","don't","it's","that's","you're","i'll","i'd",
	       "ain't","he's","they're","can't","doesn't","you's","wouldn't",
	       "she's","won't","it'll","there's","isn't","you'll","we'll",
	       "we're","shouldn't","hasn't","hain't","i's","he'll",
	       "we's","they'll","he'd","y'all","you'd","you've","haven't",
	       "didn't","aren't",
	       
	       // selected requests from Lara and Benj
	       "just","like","yeah","well","oh","yea","get","too","ah","up",
	       "good","ok","okay","think","know","about","then","now","some"
	       
	       // ignored requests from Lara and Benj
	       /* actually, really
	        * heh, hehe, hah, ha, hee, lol, :), :-)
	        */
	};
	static
	{
		Arrays.sort(stopWords);
	}
}
